<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!--引入vue的js库-->
    <script src="../js/vue.js"></script>
    <!--
        v-for: vue中的增强for循环
    -->
</head>
<body>
<div id="app" >
   <div v-for="(thisCity,i) in city">
       第{{i+1}}名:
       <span v-if="thisCity == '北京'">首都</span>
       <span v-else>{{thisCity}}</span>
   </div>
</div>
</body>
<script>
    new Vue({
        el:"#app",
        data:{
            city:["北京","上海","深圳","广州","重庆","武汉","南京"]//数组
        },
        methods: {

        }
    })
</script>
</html>